$(function () {
    findAll();
});

function findAll() {
    let data = myAjax("/home", {}, "get");

    setProductData(data.productArray);
}



function setProductData(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += ' <div>\n' +
            '                    <div><img src="../img/48_j53b.jpg" height="300" width="300"/></div>\n' +
            '                    <div>\n' +
            '                        <div>\n' +
            data[i].name +
            '\n' +
            '                        </div>\n' +
            '                        <div>' + data[i].content + '</div>\n' +
            '                    </div>\n' +
            '                </div>';
    }
    $("#product").html(html);
}